import Vue from 'vue'
import Router from 'vue-router'
import Index from './views/Index.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      name: 'index',
      component: Index,
      children: [{
        path: '/login',
        component: function () {
          return import('./views/Login.vue')
        }
      }
      ]
    },
    {
      path: '/home',
      name: 'home',
      component: function () {
        return import(/* webpackChunkName: "about" */ './views/Home.vue')
      },
      children: [{
        path: '/homedetail',
        component: function () {
          return import('./views/HomeDetail.vue')
        }
      }]
    },
    {
      path: '/train',
      name: 'train',
      component: function () {
        return import('./views/Train.vue')
      }
    },
    {
      path: '/share',
      name: 'share',
      component: function () {
        return import('./views/Share.vue')
      }
    },
    {
      path: '/club',
      name: 'club',
      component: function () {
        return import('./views/Club.vue')
      }
    },
    {
      path: '/me',
      name: 'me',
      component: function () {
        return import('./views/Me.vue')
      }
    },
    {
      path: '/traindetail',
      name: 'traindetail',
      component: function () {
        return import('./views/Traindetail.vue')
      }
    },
    {
      path: '/trainingdetail',
      name: 'trainingdetail',
      component: function () {
        return import('./views/Trainingdetail.vue')
      }
    },
    {
      path: '/doshare',
      name: 'doshare',
      component: function () {
        return import('./views/DoShare.vue')
      }
    },
    {
      path: '/myshare',
      name: 'myshare',
      component: function () {
        return import('./views/MyShare.vue')
      }
    },
    {
      path: '/clubdetail',
      name: 'clubdetail',
      component: function () {
        return import('./views/ClubDetail.vue')
      }
    },
    {
      path: '/sharedetail',
      name: 'sharedetail',
      component: function () {
        return import('./views/ShareDetail.vue')
      }
    },
    {
      path: '/masterdetail',
      name: 'masterdetail',
      component: function () {
        return import('./views/MasterDetail.vue')
      }
    },
    {
      path: '/myclub',
      name: 'myclub',
      component: function () {
        return import('./views/MyClub.vue')
      }
    },
    {
      path: '/mymaster',
      name: 'mymaster',
      component: function () {
        return import('./views/MyMaster.vue')
      }
    }
  ]
})
